Skip to content

Conversation

@ebembi-crdb
Copy link
Contributor

@ebembi-crdb ebembi-crdb commented Dec 10, 2025

Summary

Adds a Docker-based build system to ensure consistent Jekyll documentation builds across all developers and environments. This eliminates "works on my machine" issues by pinning all dependencies.

  • Create Dockerfile with pinned versions (Ruby 3.4, Bundler 2.7.2, Jekyll 4.3.4, Python 3.13, Node.js 20)
  • Add Makefile targets for Docker-based local development
  • Add GCP Cloud Build configuration for multi-arch image publishing
  • Publish initial image to us-docker.pkg.dev/release-notes-automation-stag/docs-builder
  • Add LOCAL_DEVELOPMENT.md at repo root with simple instructions for writers

Usage

For writers (see LOCAL_DEVELOPMENT.md):

cd src/current
make docker-pull
make docker-serve

For engineers:

cd src/current
make docker-build   # Build image locally (first time)
make docker-serve   # Serve docs at http://localhost:4000/docs/

Test plan

  • Build Docker image locally with make docker-build
  • Run make docker-serve and verify site loads at localhost:4000/docs/
  • Verify make docker-pull works with pre-built image from GCP

This adds a Docker-based build system for consistent Jekyll documentation
builds across all developers and environments.

Changes:
- Add Dockerfile with pinned versions (Ruby 3.4, Bundler 4.0, Jekyll 4.3.4)
- Add .dockerignore to exclude build artifacts
- Add ci/README.md with usage documentation and troubleshooting
- Add ci/cloudbuild.yaml for GCP Cloud Build multi-arch builds
- Update Makefile with docker-build, docker-serve, docker-shell targets
- Update Gemfile with Docker rebuild instructions
- Fix _plugins/versions/release_info.rb for Docker path compatibility

Image published to: us-docker.pkg.dev/release-notes-automation-stag/docs-builder/docs-builder:latest

Usage:
  make docker-build  # Build image locally
  make docker-serve  # Serve docs at http://localhost:4000/docs/
  make docker-pull   # Pull pre-built image from GCP
@ebembi-crdb ebembi-crdb requested a review from a team as a code owner December 10, 2025 14:09
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit c36b9c9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/697b7d339187d4000738e430

@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit c36b9c9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/697b7d33cb65640007ba34ac

@github-actions
Copy link

github-actions bot commented Dec 10, 2025

Files changed:

  • .gitignore
  • LOCAL_DEVELOPMENT.md
  • src/current/.dockerignore
  • src/current/Dockerfile
  • src/current/Gemfile
  • src/current/Gemfile.lock
  • src/current/Makefile
  • src/current/_plugins/versions/release_info.rb
  • src/current/ci/README.md
  • src/current/ci/cloudbuild.yaml

@netlify
Copy link

netlify bot commented Dec 10, 2025

Netlify Preview

Name Link
🔨 Latest commit c36b9c9
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/697b7d3360e22c0008d40244
😎 Deploy Preview https://deploy-preview-21567--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kikiya kikiya self-assigned this Jan 27, 2026
Copy link
Contributor

@kikiya kikiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the build works as expected, please update instructions to include memory settings for Rancher.


```bash
# 1. Build the Docker image (first time only)
make docker-build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't need to build docker image. Let's keep that as something in our ownership. We will build and publish it. They only need to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the Quick Start section to use make docker-pull instead of make docker-build. Removed the docker-pull mention from "Other useful commands" since it's now the primary flow.

LABEL org.opencontainers.image.description="Hermetic build environment for CockroachDB documentation"
LABEL org.opencontainers.image.source="https://github.com/cockroachdb/docs"
LABEL ruby.version="3.4.0"
LABEL bundler.version="4.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how different is this build environment from Netlify? We may want to keep track of this. If things build locally but not on Netlify it might cause issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the Docker image to match Netlify exactly:

  • Ruby: 3.4.0 → 3.2.1 (matches netlify.toml)
  • Node.js: 20 LTS → 18.x (matches netlify.toml)
  • Bundler: 4.0.0 → 2.7.2 (matches Gemfile.lock)

Added a comment in the Dockerfile noting these versions are kept in sync with netlify.toml. Also added
a note in README.md reminding to update both files together.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's create a simplified readme for docs writers. This one is great for the engineering team. The writers can use a much simpler version that just shows how to use the make files. With the minimal system requirements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restructured the README with a clear separation:

  • Top section: Simple Quick Start for docs writers with just docker-pull and docker-serve
  • Prerequisites: Added memory requirements for Docker Desktop and Rancher Desktop (8-10 GB RAM)
  • Engineering Reference: Moved detailed build/publish instructions below a divider for the engineering team

@ebembi-crdb ebembi-crdb enabled auto-merge January 29, 2026 15:33
@ebembi-crdb ebembi-crdb merged commit b8fc597 into main Jan 29, 2026
7 checks passed
@ebembi-crdb ebembi-crdb deleted the docker-build-environment branch January 29, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants